{% extends 'base.html' %}


{% block title %}{{ name }}{% endblock %}

{% block breadcrumb %}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/">Datasets</a></li>
        <li class="breadcrumb-item"><a href="{{ '/%s'%name }}">{{ name }}</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ sample['_id'] }}</li>
    </ol>
</nav>
{% endblock %}

{% block head %}{{ sample['_id'] }}{% endblock %}

{% block content %}
<div class="row">
    {% if sample %}
    <div class="col"><img src="{{ download_link }}" class="img-fluid" alt="{{ id }}"></div>
    <div class="col">
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th scope="col">项目</th>
                    <th scope="col">内容</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th>文件名</th>
                    <td>{{ sample['base_name'] }}</td>
                </tr>
                <tr>
                    <th>作者</th>
                    <td>{{ sample['authors'] }}</td>
                </tr>
                <tr>
                    <th>标签</th>
                    <td>{{ sample['manual_tags'] }}</td>
                </tr>
                <tr>
                    <th>日期</th>
                    <td>{{ sample['index_time'] }}</td>
                </tr>
                <tr>
                    <th>大小</th>
                    <td>{{ sample['file_size'] }}</td>
                </tr>
                <tr>
                    <th>HASH</th>
                    <td>{{ sample['hash'] }}</td>
                </tr>
                <tr>
                    <th>原始标签</th>
                    <td>{{ sample['raw_tag'] }}</td>
                </tr>
                <tr>
                    <th>原始路径</th>
                    <td>{{ sample['origin_path'] }}</td>
                </tr>
            </tbody>
        </table>
    </div>
    {% else %}
    <div class="alert alert-primary my-3" role="alert">
        没有找到记录。
    </div>
    {% endif %}
</div>
{% endblock %}